🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / widget / src / main / kotlin / org / meshtastic / feature / widget / AndroidAppWidgetUpdater.kt
Displaying Raw • Download
feature/widget/src/main/kotlin/org/meshtastic/feature/widget/AndroidAppWidgetUpdater.kt 5e44cbd3a902f4152905e1d9558db0e92efe193b (5e44cbd3) Text, 1.51 KB
T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.widget
Tff7b72import T7ee787android.content.Context
Tff7b72import T7ee787androidx.glance.appwidget.updateAll
Tff7b72import T7ee787co.touchlab.kermit.Logger
Tff7b72import T7ee787org.koin.core.annotation.Single
Tff7b72import T7ee787org.meshtastic.core.repository.AppWidgetUpdater
Tf0883e@Single
Tff7b72class T56d364AndroidAppWidgetUpdaterTb4b4b4(Tff7b72private Tff7b72val Te6edf3contextTb4b4b4: Te6edf3ContextTb4b4b4) Tb4b4b4: Te6edf3AppWidgetUpdater Tb4b4b4{
Tff7b72override Tff7b72suspend Tff7b72fun Td2a8ffupdateAllTb4b4b4(Tb4b4b4) Tb4b4b4{
T8b949e// Kickstart the widget composition.
T8b949e// The widget internally uses collectAsState() and its own sampled StateFlow
T8b949e// to drive updates automatically without excessive IPC and recreation.
Tf0883e@SuppressTb4b4b4(Ta5d6ff"Ta5d6ffTooGenericExceptionCaughtTa5d6ff"Tb4b4b4)
Tff7b72try Tb4b4b4{
Te6edf3LocalStatsWidgetTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3updateAllTb4b4b4(Te6edf3contextTb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Te6edf3eTb4b4b4: Te6edf3ExceptionTb4b4b4) Tb4b4b4{
Te6edf3coTb4b4b4.Te6edf3touchlabTb4b4b4.Te6edf3kermitTb4b4b4.Te6edf3LoggerTb4b4b4.Te6edf3eTb4b4b4(Te6edf3eTb4b4b4) Tb4b4b4{ Ta5d6ff"Ta5d6ffFailed to update widgetsTa5d6ff" Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.4 - Generated in 0.04s